package com.yshy.moviechoseseatinginnerapi.controller;

import com.yshy.moviechoseseatinginnerapi.service.ShowsService;
import com.yshy.moviechoseseatingcommon.entity.bo.shows.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author :
 * @desc :
 * @create: 下午1:42
 **/
@RestController
@RequestMapping("/shows")
public class ShowsController {
    @Autowired
    ShowsService showsService;
    /**
     * 查询影院近期所有场次
     */
    @PostMapping("/listByCinemaId")
    public String listByCinemaId(@RequestBody @Valid ListByCinemaIdBo bo){
        return showsService.listByCinemaId(bo);
    }

    /**
     * 根据城市和影片查询场次
     * @param bo
     * @return
     */
    @PostMapping("/listByCityAndFilm")
    public String listByCityAndFilm(@RequestBody @Valid ListByCityAndFilmBo bo){
        return showsService.listByCityAndFilm(bo);
    }
    /**
     * 根据城市查询场次
     */
    @PostMapping("/listByCityId")
    public String listByCityId(@RequestBody @Valid ListsByCityIdBo bo){
        return showsService.listByCityId(bo);
    }
    /**
     * 根据影院和影片查询场次
     */
    @PostMapping("/listByCinemaAndFilm")
    public String listByCinemaAndFilm(@RequestBody @Valid ListByCinemaAndFilmBo bo){
        return showsService.listByCinemaAndFilm(bo);
    }
    /**
     * 查询场次实时座位
     */
    @PostMapping("/getRealTimeSeatByShowId")
    public String getRealTimeSeatByShowId(@RequestBody @Valid GetRealTimeSeatByShowIdBo bo){
        return showsService.getRealTimeSeatByShowId(bo);
    }
    /**
     * 分页查询场次
     */
    @PostMapping("/pagedQuery")
    public String pagedQuery(@RequestBody @Valid PagedQueryBo bo){
        return showsService.pagedQuery(bo);
    }
    /**
     * 按城市、影院、影片查询场次日期
     */
    @PostMapping("/v1ListShowDate")
    public String v1ListShowDate(@RequestBody @Valid V1ListShowDateBo bo){
        return showsService.v1ListShowDate(bo);
    } /**
     * 按城市、影院、影片查询场次日期V2
     */
    @PostMapping("/v2ListShowDate")
    public String v2ListShowDate(@RequestBody @Valid V2ListShowDateBo bo){
        return showsService.v2ListShowDate(bo);
    }


}
